<?
$refueling_list=select_lines_all_items($table_Prefix."refueling","","equipmentid = '".$detail['nid']."' order by applydate desc,nid desc",""); ?>

<?$chepai=select_one_line_all_items($table_Prefix."equipment","nid = '".$refueling_list[0]['equipmentid']."'");?>


<table class="layui-table">
    <colgroup>
        <col width="60">
        <col width="100">
        <col >
        <col >
        <col >
        <col >
        <col >
        <col >
        <col width="200">

        <col>
    </colgroup>
    <thead>
    <tr>
        <th>序号</th>
        <th>车牌</th>
        <th>里程数</th>
        <th>加油日期</th>
        <th>加油金额</th>
        <th>加油数量</th>
        <th>负责人</th>
        <th>汽油类型</th>
        <th>备注</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>


    <?php
    for ($i = 0; $i < count($refueling_list); $i++) {
        ?>
        <tr>



            <td><?echo $i+1 ?></td>
            <td><?echo $chepai['name']?></td>
            <td><?echo $refueling_list[$i]['mileage']?></td>
            <td><?echo $refueling_list[$i]['applydate']?></td>
            <td><?echo $refueling_list[$i]['cost']?></td>
            <td><?echo $refueling_list[$i]['number']?></td>
            <?$principal=select_one_line_all_items($table_Prefix."employee","nid = '".$refueling_list[$i]['principal']."'");?>
            <td><?echo $principal["name"]?></td>
            <td><?echo $refueling_list[$i]['type']?></td>
            <td><?echo $refueling_list[$i]['remark']?></td>
            <td>
                <a href="../refueling/detail-edit.php?nav-itemed=<?echo $system_part?>&nid=<? echo $refueling_list[$i]['nid']?>" class="layui-btn layui-btn-primary layui-btn-small" >
                    <i class="layui-icon">&#xe642;</i>
                </a>



            </td>
        </tr>
        <?php

    }
    ?>


    </tbody>
</table>